<template>
	<view class="">
		<view class="c_input">
			<view class="title">推荐人ID</view>
			<input @confirm="go" class="uni-input" v-model="id" focus placeholder="请填写推荐人ID" />
		</view>
		<button style="background-color: #8405dc;color: #FFFFFF;" @tap="go">确定</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: ""
			}
		},
		onLoad(option) {

		},
		methods: {
			go() {
				var that = this;
				that.$axios('Checkagent/main', "POST", 'member', {
					mid: that.id
				}).then(res => {
					if (res.data.code == 200) {
						uni.navigateTo({
							url: 'register?id=' + that.id
						})
					}
				}, (error) => {

				})

			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #efefef;
	}

	.c_input {
		display: flex;
		align-items: center;
		height: 40px;
		background: #fff;
		font-size: 16px;
		padding: 0 20upx;
		box-sizing: border-box;
		margin: 20upx 0;

		input {
			height: 100%;
			margin-left: 20upx;
			flex: 1;
		}
	}
</style>
